//
//  HEIMRoomUserCell.m
//  HealthFamily
//
//  Created by 吴欧 on 2021/2/26.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import "HEIMRoomUserCell.h"

@interface HEIMRoomUserCell ()

@property (nonatomic, strong) UIImageView *iconView;

@end

@implementation HEIMRoomUserCell

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame: frame]) {
        [self initUI];
    }
    return self;
}

- (void)initUI {
    _iconView = [UIImageView new];
    _iconView.layer.masksToBounds = YES;
    _iconView.layer.cornerRadius = 30;
    [_iconView sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:IMAGE_NAMED(@"noImage")];
    [self.contentView addSubview: _iconView];
    
    [_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.right.left.bottom.equalTo(self.contentView);
    }];
}

- (void)setModel:(HEIMKitInfo *)model {
    _model = model;
    
    [_iconView sd_setImageWithURL:[NSURL URLWithString: model.avatarUrlString] placeholderImage:IMAGE_NAMED(@"defualt_icon")];
}

@end
